<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link rel="stylesheet" href="__STATIC__/layout/css/zTreeStyle.css" type="text/css">
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/sc/js/page.js"></script>
     <style>
  
    #pagesize{height:23px;}
    </style>
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
      <div class="page-heade">
       <h2 class="title_color text-center">日常预算费用统计查询</h2>
    </div>
    <!-- 标题 -->

    <!-- 筛选 -->
      <form action="#" method="post" id="form_check" accept-charset="utf-8" class="form-horizontal formpage">
       <input type="hidden" value='{$page}' name="page" id="page-go"/>
        <input type="hidden" value='{$list}' name="list" id="list-go"/>
       <div class="form-group margin-10">
           <label class="col-sm-2 control-label text-right">二级费用科目：</label>
           <div class="col-sm-10">
             <div class="col-sm-3">
                 <select class="form-control" name="yijifeiyong" id="yijifeiyong">
                  <option value="0">请选择一级科目</option>
                 {volist name="yijifeiyong" id="voyi"}
              {if condition="$data.yijifeiyong eq $voyi.id"}
                <option value="{$voyi.id}" selected>{$voyi.title}</option>
              {else/}
                <option value="{$voyi.id}">{$voyi.title}</option>
              {/if}
                 {/volist}
                </select>
             </div>
             <div class="col-sm-3">
               <select class="form-control" name="erjifeiyong" id="erjifeiyong">
          <option value="0">请选择二级科目</option>
          
        </select>
             </div>
              
              
           </div>
       </div>
       
       <div class="form-group">
           <label class="col-sm-2 control-label text-right">部门：</label>
           <div class="col-sm-10">
             <div class="col-sm-3">
                <select name="depart" class="form-control">
                  <option value="0">请选择部门</option>
                  {volist name="depart" id="vod"}
                  	{if condition="$data.depart eq $vod.id"}
                  	<option value="{$vod.id}" selected>{$vod.de_name}</option>
                  	{else/}
                  	<option value="{$vod.id}">{$vod.de_name}</option>
                  	{/if}
                  {/volist}
              </select>
             </div>
           </div>
       </div>
       
       <div class="form-group">
           <label class="col-sm-2 control-label text-right">二级考核期：</label>
           <div class="col-sm-10">
            <div class="col-sm-3">
                <select class="form-control" name="cainian" id="cainian">
          <option value="0">请选择财年</option>
          {volist name="cainian" id="voc"}
            {if condition="$data.cainian eq $voc.id"}
            <option value="{$voc.id}" selected>{$voc.title}</option>
            {else/}
            <option value="{$voc.id}">{$voc.title}</option>
            {/if}
          {/volist}
        </select>
             </div>
              <div class="col-sm-3">
               <select class="form-control" name="yijikaoheqi" id="yijikaoheqi">
          <option value="0">请选择一级考核期</option>
        
        </select>
             </div>
              <div class="col-sm-3">
               <select class="form-control" name="erjikaoheqi" id="erjikaoheqi">
          <option value="0">请选择二级考核期</option>
         
        </select>
             </div>
           </div>
       </div>
       <div class="container-fluid margin-10 text-center">
        <input type="button" value="查询" class='btn btn-outline btn-primary' id="check"/>
        <input type="button" value="清空查询条件" class='btn btn-outline btn-warning' id="clear_check"/>
             <input type="button" value="导出数据" class='btn btn-outline btn-success'/>
      </div>
      </form>
    <!-- 筛选 -->

    <!-- 表格 -->
    <div class="col-md-12 no-padding"  style="padding: 0 12px;">
     {if condition="$sum neq 0"}
        <table class="table table-hover table-bordered text-center table-striped bud_hei">
                <tr class="info">
                    <th class="text-center">一级费用科目</th>
                    <th class="text-center">二级费用科目</th>
                    <th class="text-center">部门</th>
                    <th class="text-center">财年</th>
                    <th class="text-center">一级考核期</th>
                     <th class="text-center">二级考核期</th>
                    <th>金额（元）</th>
                </tr>
               {volist name="apply" id="vo"}
               	<tr>
					<td>{$vo.yijifeiyong}</td>
					<td>{$vo.erjifeiyong}</td>
					<td>{$vo.depart}</td>
					<td>{$vo.cainian}</td>
					<td>{$vo.yijikaoheqi}</td>
					<td>{$vo.erjikaoheqi}</td>
					<td>{$vo.feiyong}</td>
               	</tr>
               {/volist}
        </table>
        <h5 class="text-center" id="pagesc" style="font-size: 16px;font-weight: 500">
            <script>
                            $(function(){
                                pageSC("pagesc",{$sum},{$page},{$maxpage})
                            })
                        </script>
          每页显示
          <select id="pagesize">
           
            <option value='20'{if condition="$list eq 20"}selected{/if}>20条</option>
			<option value='40'{if condition="$list eq 40"}selected{/if}>40条</option>
			<option value='50'{if condition="$list eq 50"}selected{/if}>50条</option>
          </select>
        </h5>
        {else/}
        <h3 class="text-center">对不起没有查询到符合条件的信息</h3>
    		{/if}
       
      </div>
    <!-- 表格 -->
    <div>

    </div>
  
        
    </div>
    
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <!-- <script src="js/plugins/layer/layer.min.js"></script> -->
    <!-- 自定义js -->
    <script src="__STATIC__/layout/js/content.js?v=1.0.0"></script>
     <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
    
    <!-- ztree -->
    <script type="text/javascript" src="__STATIC__/layout/js/jquery.ztree.core.js"></script>
    <script type="text/javascript" src="__STATIC__/layout/js/jquery.ztree.excheck.js"></script>
    <!-- <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script> -->
    <!--统计代码，可删除-->
    <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
    <script>
    	 //翻页
     
        $("#check").click(function(){
              $("#page-go").val(1);
              $(".formpage").submit();
        })
        $("#clear_check").click(function(){
            
            $("#page-go").val(1);
            
            $("select").val(0);
          
           $(".formpage").submit();
        })
        var kaohe1json='{$jsonkaohe1}';
        var kaohe1arr=JSON.parse(kaohe1json);
        var kaohe2json='{$jsonkaohe2}';
        var kaohe2arr=JSON.parse(kaohe2json);
        var jsonerjifeiyong='{$jsonerjifeiyong}';
        var feiyong2arr=JSON.parse(jsonerjifeiyong)

           {if $data.yijifeiyong}
            erfeixy();

            {/if}
            {if $data.erjifeiyong}
            $("#erjifeiyong").val({$data.erjifeiyong})

            {/if}
            {if $data.cainian}
            yikaoxy();
            {/if}
            {if $data.yijikaoheqi}
            $("#yijikaoheqi").val({$data.yijikaoheqi})
            erkaoxy();
            {/if}
            {if $data.erjikaoheqi}
               $("#erjikaoheqi").val({$data.erjikaoheqi})
            {/if}
        $(function(){
           


        	
        	$("#cainian").change(function(){
        		
        		yikaoxy();
        		erkaoxy();
        		
        	})
        	$("#yijikaoheqi").change(function(){
        		
        		erkaoxy();
        	})
        	$("#yijifeiyong").change(function(){
        		
        		erfeixy();
        	})
        	
        	
        })
       //一级考核期显示隐藏
      function yikaoxy(){
        $("#yijikaoheqi").html('<option value="0">请选择一级考核期</option>')
        for(var i=0;i<kaohe1arr.length;i++){
          if(kaohe1arr[i]["cainian"]==$("#cainian").val()){
            $("#yijikaoheqi").append('<option value="'+kaohe1arr[i]["id"]+'">'+kaohe1arr[i]["title"]+'</option>')
          }
        }
        erkaoxy();
      }
      //二级考核期显示隐藏
       function erkaoxy(){
         $("#erjikaoheqi").html('<option value="0">请选择二级考核期</option>')
         for(var i=0;i<kaohe2arr.length;i++){
          if(kaohe2arr[i]["yijikaoheqi"]==$("#yijikaoheqi").val()){
            $("#erjikaoheqi").append('<option value="'+kaohe2arr[i]["id"]+'">'+kaohe2arr[i]["title"]+'</option>')
          }
        }
      }
      //二级费用科目显示隐藏
      function erfeixy(){
        //feiyong2arr
        $("#erjifeiyong").html('<option value="0">请选择二级科目</option>')
        for(var i=0;i<feiyong2arr.length;i++){
          if(feiyong2arr[i]["yijifeiyong"]==$("#yijifeiyong").val()){
            $("#erjifeiyong").append('<option value="'+feiyong2arr[i]["id"]+'">'+feiyong2arr[i]["title"]+'</option>')
          }
        }
      }
   
    </script>
</body>

</html>
